package gwtappcontainer.server;

import gwtappcontainer.client.HistoryToken;
import gwtappcontainer.client.toberemoved.StatsService;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.googlecode.objectify.ObjectifyService;

@SuppressWarnings("serial")
public class StatsServiceImpl extends RemoteServiceServlet implements
    StatsService { 
	
	static {
		ObjectifyService.factory().register(ViewStatsEntity.class);			
	}
	
	public StatsServiceImpl() {		
	}

	@Override
	public void recordView(HistoryToken viewProp) {
		
//		ViewStatsEntity toSave = new ViewStatsEntity(viewProp);
//		toSave.ip = getThreadLocalRequest().getRemoteAddr();
//		
//		ofy().save().entity(toSave); //can be async, so no need for now()	
	}
}